package com.xiweicheng.test.jpa;
// Generated 2018-7-14 9:20:43 by Hibernate Tools 5.0.6.Final

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * Label generated by hbm2java
 */
@Entity
@Table(name = "label", catalog = "tms")
public class Label implements java.io.Serializable {

	private Long id;
	private long version;
	private Chat chat;
	private Translate translate;
	private Date createDate;
	private String creator;
	private String description;
	private String name;
	private String status;
	private Date updateDate;
	private String updater;

	public Label() {
	}

	public Label(String name, String status) {
		this.name = name;
		this.status = status;
	}

	public Label(Chat chat, Translate translate, Date createDate, String creator, String description, String name,
			String status, Date updateDate, String updater) {
		this.chat = chat;
		this.translate = translate;
		this.createDate = createDate;
		this.creator = creator;
		this.description = description;
		this.name = name;
		this.status = status;
		this.updateDate = updateDate;
		this.updater = updater;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "version", nullable = false)
	public long getVersion() {
		return this.version;
	}

	public void setVersion(long version) {
		this.version = version;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "chat_id")
	public Chat getChat() {
		return this.chat;
	}

	public void setChat(Chat chat) {
		this.chat = chat;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "translate_id")
	public Translate getTranslate() {
		return this.translate;
	}

	public void setTranslate(Translate translate) {
		this.translate = translate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_date", length = 19)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name = "creator")
	public String getCreator() {
		return this.creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	@Column(name = "description", length = 2000)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "name", nullable = false)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "status", nullable = false)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_date", length = 19)
	public Date getUpdateDate() {
		return this.updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	@Column(name = "updater")
	public String getUpdater() {
		return this.updater;
	}

	public void setUpdater(String updater) {
		this.updater = updater;
	}

}
